@(logfilecontent: String)(user:User) 
@import helper._ 
@implicitField =@{ FieldConstructor(views.html.helper.bootstrapTextareaControlGroup.f) }



@indextemplate(title = logfilecontent,user) {
	<script src="@routes.Assets.at("javascripts/bootstrap/bootstrap-dropdown.js")" type="text/javascript"></script>
	<script src="@routes.Assets.at("javascripts/bootstrap/bootstrap-tab.js")" type="text/javascript"></script>
	<link rel="stylesheet" media="screen" href='@routes.Assets.at("stylesheets/docs.css")'>
	<div class="bs-docs-example">
		<ul id="myTab" class="nav nav-tabs">
		  <li class="active"><a href="#process601" data-toggle="tab">process601</a></li>
		  <li><a href="#process602" data-toggle="tab">process602</a></li>
		  <li><a href="#process701" data-toggle="tab">process701</a></li>
		  <li class="dropdown">
		    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
		    <ul class="dropdown-menu">
		      <li><a href="#process801" data-toggle="tab">其他</a></li>
		      <li><a href="#process201" data-toggle="tab">关于</a></li>
		      <li><a href="#processtools" data-toggle="tab">工具</a></li>
		    </ul>
		  </li>
		</ul>
		<div id="myTabContent" class="tab-content">
		  <div class="tab-pane fade in active" id="process601">
		  	开发中
			<div class="progress progress-info progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		  <div class="tab-pane fade in" id="process602">
		    开发中
			<div class="progress progress-danger progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		  <div class="tab-pane fade" id="process701">
		    开发中
			<div class="progress progress-warning progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		  <div class="tab-pane fade" id="process801">
		    开发中
			<div class="progress progress-success progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		  <div class="tab-pane fade" id="process201">
		    开发中
			<div class="progress progress-info progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		  <div class="tab-pane fade" id="processtools">
		    <textarea id='t1' cols="80" rows="20"></textarea>
		    <button type="button" onclick="getpics()" class="btn btn-primary">Create</button>
			<div class="progress progress-info progress-striped active">
				<div class="bar" style="width: 40%;"></div>
			</div>
		  </div>
		</div>
	</div>
@form(action = routes.BarCode.query(""), 'id -> "form") {
	<legend>查询</legend>
	<input type="hidden" name="id" value="id">
	<input type="search" id="searchbox" name="f" value=""
		placeholder="Query ..." class="input-medium search-query">
	<!-- button type="submit" class="btn btn-primary">查询</button-->
	<button type="button" onclick="getpic()" class="btn btn-primary">Create</button>
}
	<BR />
	<BR />
	<BR />
	<BR />
	<div id="showpic"></div>
	<BR />
	<BR />
	<BR />
	<BR />
	<div id="showpic2"></div>
	<script type="text/javascript">
		function  getpic(){
			s = $('#searchbox').val();
			s=  encodeURIComponent(s);
			//alert(s);
			
			$('#showpic').html("<a class='thumbnail'><img src=\"./BarCode/"+s+".png\"  alt=\""+s+"\" /></a>")
			
			$('#showpic2').html("<a class='thumbnail'><img src=\"./BarCode2/"+s+".png\"  alt=\""+s+"\" class=\"img-polaroid\"/></a>")
		}
		String.prototype.replaceAll  = function(s1,s2)
		{       
			return this.replace(new RegExp(s1,"gm"),s2);       
		}   
		$("form").submit(function(e){
		    e.preventDefault();
		    getpic();
		});
		function  getpics(){
			var str = $('#t1').val();
			str = str.replaceAll("\r","#$#");//适应不同浏览器
			str = str.replaceAll("\n","#$#");//适应不同浏览器
			var arr = str.split("#$#");
			for(var i=0;i<arr.length;i++){
				var tempstr = arr[i];
				$('#showpic').append("<a class='thumbnail'><img src=\"./BarCode/"+tempstr+".png\"  alt=\""+tempstr+".png\" /></a>")
			}
			
			
		}
	</script>
}
